CC = arm-apple-darwin-cc 
LD = $(CC)

LDFLAGS = 	-lobjc \
			-framework CoreFoundation \
			-framework Foundation \
			-framework UIKit \
			-framework LayerKit \
			-framework CoreGraphics \
			-framework GraphicsServices \
			-framework CoreSurface \

all:		FiveDice

FiveDice:	main.o \
			FDApplication.o \
			FDDefaultsController.o \
			FDDiePushButton.o \
			FDGameView.o \
			FDGameMenuView.o \
			FDScoreCardView.o \
			FDHighScoresView.o \
			FDTextInputView.o \
						
			$(LD) $(LDFLAGS) -v -o $@ $^ 
			
%.o:    %.m 
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

%.m:    %.h


clean:
		rm -rf *.o *~ FiveDice "FiveDice.app"
		
package: FiveDice
	rm -fr "FiveDice.app"
	mkdir -p "FiveDice.app"
	cp FiveDice "FiveDice.app/FiveDice"
	cp Info.plist "FiveDice.app/Info.plist"
	cp icon.png "FiveDice.app/icon.png"
	cp Default.png "FiveDice.app/Default.png"
	cp PkgInfo "FiveDice.app/PkgInfo"
	cp Resources/greenfelt.png "FiveDice.app/greenfelt.png"
	cp Resources/one.png "FiveDice.app/one.png"
	cp Resources/two.png "FiveDice.app/two.png"
	cp Resources/three.png "FiveDice.app/three.png"
	cp Resources/four.png "FiveDice.app/four.png"
	cp Resources/five.png "FiveDice.app/five.png"
	cp Resources/six.png "FiveDice.app/six.png"
	cp Resources/one_d.png "FiveDice.app/one_d.png"
	cp Resources/two_d.png "FiveDice.app/two_d.png"
	cp Resources/three_d.png "FiveDice.app/three_d.png"
	cp Resources/four_d.png "FiveDice.app/four_d.png"
	cp Resources/five_d.png "FiveDice.app/five_d.png"
	cp Resources/six_d.png "FiveDice.app/six_d.png"
	cp Resources/navbar.png "FiveDice.app/navbar.png"
	cp Resources/bottombar.png "FiveDice.app/bottombar.png"
	cp Resources/scorecard.png "FiveDice.app/scorecard.png"
	cp Resources/banner.png "FiveDice.app/banner.png"
	cp Resources/ones.png "FiveDice.app/ones.png"
	cp Resources/twos.png "FiveDice.app/twos.png"
	cp Resources/threes.png "FiveDice.app/threes.png"
	cp Resources/fours.png "FiveDice.app/fours.png"
	cp Resources/fives.png "FiveDice.app/fives.png"
	cp Resources/sixes.png "FiveDice.app/sixes.png"
	cp Resources/3ofakind.png "FiveDice.app/3ofakind.png"
	cp Resources/4ofakind.png "FiveDice.app/4ofakind.png"
	cp Resources/fullhouse.png "FiveDice.app/fullhouse.png"
	cp Resources/smstraight.png "FiveDice.app/smstraight.png"
	cp Resources/lgstraight.png "FiveDice.app/lgstraight.png"
	cp Resources/yahtzee.png "FiveDice.app/yahtzee.png"
	cp Resources/templogo.png "FiveDice.app/templogo.png"
	cp Resources/player1.png "FiveDice.app/player1.png"
	cp Resources/player1_dn.png "FiveDice.app/player1_dn.png"
	cp Resources/player2.png "FiveDice.app/player2.png"
	cp Resources/player2_dn.png "FiveDice.app/player2_dn.png"
	cp Resources/woodbutton_up.png "FiveDice.app/woodbutton_up.png"
	cp Resources/woodbutton_dn.png "FiveDice.app/woodbutton_dn.png"
	cp Resources/keyboardbar.png "FiveDice.app/keyboardbar.png"
	cp Resources/done_en.png "FiveDice.app/done_en.png"
	cp Resources/done_dn.png "FiveDice.app/done_dn.png"

